Part Number Hot Search : 
110004 NJM2519 M4004 NJ1800DL ES3AB11 TL064CN 4069U 330000
Product Description
Full Text Search
 

To Download ATMEGA48 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  2545bs?avr?01/04 features  high performance, low power avr ? 8-bit microcontroller  advanced risc architecture ? 131 powerful instructions ? most single clock cycle execution ? 32 x 8 general purpose working registers ? fully static operation ? up to 24 mips throughput at 24 mhz ? on-chip 2-cycle multiplier  non-volatile program and data memories ? 4/8/16k bytes of in-system self-programmable flash (ATMEGA48/88/168) endurance: 10,000 write/erase cycles ? optional boot code section with independent lock bits in-system programming by on-chip boot program true read-while-write operation ? 256/512/512 bytes eeprom (ATMEGA48/88/168) endurance: 100,000 write/erase cycles ? 512/1k/1k byte internal sram (ATMEGA48/88/168) ? programming lock for software security  peripheral features ? two 8-bit timer/counters with separate prescaler and compare mode ? one 16-bit timer/counter with separate prescaler, compare mode, and capture mode ? real time counter with separate oscillator ? six pwm channels ? 8-channel 10-bit adc in tqfp and mlf package ? 6-channel 10-bit adc in pdip package ? programmable serial usart ? master/slave spi serial interface ? byte-oriented 2-wire serial interface ? programmable watchdog timer with separate on-chip oscillator ? on-chip analog comparator ? interrupt and wake-up on pin change  special microcontroller features ? power-on reset and programmable brown-out detection ? internal calibrated oscillator ? external and internal interrupt sources ? five sleep modes: idle, adc noise reduction, power-save, power-down, and standby  i/o and packages ? 23 programmable i/o lines ? 28-pin pdip, 32-lead tqfp and 32-pad mlf  operating voltage: ? 1.8 - 5.5v for ATMEGA48v/88v/168v ? 2.7 - 5.5v for ATMEGA48/88/168  temperature range: ?-40 c to 85 c  speed grade: ? ATMEGA48v/88v/168v: 0 - 6 mhz @ 1.8 - 5.5v, 0 - 12 mhz @ 2.7 - 5.5v ? ATMEGA48/88/168: 0 - 12 mhz @ 2.7 - 5.5v, 0 - 24 mhz @ 4.5 - 5.5v  low power consumption ? active mode: 1 mhz, 1.8v: 240a 32 khz, 1.8v: 15a (including oscillator) ? power-down mode: 0.1a at 1.8v 8-bit microcontroller with 8k bytes in-system programmable flash ATMEGA48/v atmega88/v atmega168/v preliminary summary rev. 2545bs?avr?01/04 note: this is a summary document. a complete document is available on our web site at www.atmel.com.
2 ATMEGA48/88/168 2545bs?avr?01/04 pin configurations figure 1. pinout ATMEGA48/88/168 disclaimer typical values contained in this datasheet are based on simulations and characteriza- tion of other avr microcontrollers manufactured on the same process technology. min and max values will be available after the device is characterized. 1 2 3 4 5 6 7 8 24 23 22 21 20 19 18 17 (pcint19/oc2b/int1) pd3 (pcint20/xck/t0) pd4 gnd vcc gnd vcc (pcint6/xtal1/tosc1) pb6 (pcint7/xtal2/tosc2) pb7 pc1 (adc1/pcint9) pc0 (adc0/pcint8) adc7 gnd aref adc6 avcc pb5 (sck/pcint5) 32 31 30 29 28 27 26 25 9 10 11 12 13 14 15 16 (pcint21/oc0b/t1) pd5 (pcint22/oc0a/ain0) pd6 (pcint23/ain1) pd7 (pcint0/clko/icp1) pb0 (pcint1/oc1a) pb1 (pcint2/ss/oc1b) pb2 (pcint3/oc2a/mosi) pb3 (pcint4/miso) pb4 pd2 (int0/pcint18) pd1 (txd/pcint17) pd0 (rxd/pcint16) pc6 (reset/pcint14) pc5 (adc5/scl/pcint13) pc4 (adc4/sda/pcint12) pc3 (adc3/pcint11) pc2 (adc2/pcint10) tqfp top view 1 2 3 4 5 6 7 8 9 10 11 12 13 14 28 27 26 25 24 23 22 21 20 19 18 17 16 15 (pcint14/reset) pc6 (pcint16/rxd) pd0 (pcint17/txd) pd1 (pcint18/int0) pd2 (pcint19/oc2b/int1) pd3 (pcint20/xck/t0) pd4 vcc gnd (pcint6/xtal1/tosc1) pb6 (pcint7/xtal2/tosc2) pb7 (pcint21/oc0b/t1) pd5 (pcint22/oc0a/ain0) pd6 (pcint23/ain1) pd7 (pcint0/clko/icp1) pb0 pc5 (adc5/scl/pcint13) pc4 (adc4/sda/pcint12) pc3 (adc3/pcint11) pc2 (adc2/pcint10) pc1 (adc1/pcint9) pc0 (adc0/pcint8) gnd aref avcc pb5 (sck/pcint5) pb4 (miso/pcint4) pb3 (mosi/oc2a/pcint3) pb2 (ss/oc1b/pcint2) pb1 (oc1a/pcint1) pdip 1 2 3 4 5 6 7 8 24 23 22 21 20 19 18 17 32 31 30 29 28 27 26 25 9 10 11 12 13 14 15 16 mlf top view (pcint19/oc2b/int1) pd3 (pcint20/xck/t0) pd4 gnd vcc gnd vcc (pcint6/xtal1/tosc1) pb6 (pcint7/xtal2/tosc2) pb7 pc1 (adc1/pcint9) pc0 (adc0/pcint8) adc7 gnd aref adc6 avcc pb5 (sck/pcint5) (pcint21/oc0b/t1) pd5 (pcint22/oc0a/ain0) pd6 (pcint23/ain1) pd7 (pcint0/clko/icp1) pb0 (pcint1/oc1a) pb1 (pcint2/ss/oc1b) pb2 (pcint3/oc2a/mosi) pb3 (pcint4/miso) pb4 pd2 (int0/pcint18) pd1 (txd/pcint17) pd0 (rxd/pcint16) pc6 (reset/pcint14) pc5 (adc5/scl/pcint13) pc4 (adc4/sda/pcint12) pc3 (adc3/pcint11) pc2 (adc2/pcint10) note: bottom pad should be soldered to ground.
3 ATMEGA48/88/168 2545bs?avr?01/04 overview the ATMEGA48/88/168 is a low-power cmos 8-bit microcontroller based on the avr enhanced risc architecture. by executing powerful instructions in a single clock cycle, the ATMEGA48/88/168 achieves throughputs approaching 1 mips per mhz allowing the system designer to optimize power consumption versus processing speed. block diagram figure 2. block diagram port c (7) port b (8) port d (8) usart 0 8bit t/c 2 16bit t/c 1 8bit t/c 0 a/d conv. internal bandgap analog comp. spi twi sram flash eeprom watchdog oscillator watchdog timer oscillator circuits / clock generation power supervision por / bod & reset vcc gnd program logic debugwire 2 gnd aref avcc data b u s adc[6..7] pc[0..6] pb[0..7] pd[0..7] 6 reset xtal[1..2] cpu
4 ATMEGA48/88/168 2545bs?avr?01/04 the avr core combines a rich instruction set with 32 general purpose working registers. all the 32 registers are directly connected to the arithmetic logic unit (alu), allowing two independent registers to be accessed in one single instruction executed in one clock cycle. the resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional cisc microcontrollers. the ATMEGA48/88/168 provides the following features: 4k/8k/16k bytes of in-system programmable flash with read-while-write capabilities, 256/512/512 bytes eeprom, 512/1k/1k bytes sram, 23 general purpose i/o lines, 32 general purpose working reg- isters, three flexible timer/counters with compare modes, internal and external interrupts, a serial programmable usart, a byte-oriented 2-wire serial interface, an spi serial port, a 6-channel 10-bit adc (8 channels in tqfp and mlf packages), a pro- grammable watchdog timer with internal oscillator, and five software selectable power saving modes. the idle mode stops the cpu while allowing the sram, timer/counters, usart, 2-wire serial interface, spi port, and interrupt system to continue functioning. the power-down mode saves the register contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. in power-save mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. the adc noise reduction mode stops the cpu and all i/o modules except asynchronous timer and adc, to minimize switching noise during adc conversions. in standby mode, the crystal/resonator oscillator is running while the rest of the device is sleeping. this allows very fast start-up combined with low power consumption. the device is manufactured using atmel?s high density non-volatile memory technology. the on-chip isp flash allows the program memory to be reprogrammed in-system through an spi serial interface, by a conventional non-volatile memory programmer, or by an on-chip boot program running on the avr core. the boot program can use any interface to download the application program in the application flash memory. soft- ware in the boot flash section will continue to run while the application flash section is updated, providing true read-while-write operation. by combining an 8-bit risc cpu with in-system self-programmable flash on a monolithic chip, the atmel ATMEGA48/88/168 is a powerful microcontroller that provides a highly flexible and cost effective solution to many embedded control applications. the ATMEGA48/88/168 avr is supported with a full suite of program and system devel- opment tools including: c compilers, macro assemblers, program debugger/simulators, in-circuit emulators, and evaluation kits. comparison between ATMEGA48, atmega88, and atmega168 the ATMEGA48, atmega88 and atmega168 differ only in memory sizes, boot loader support, and interrupt vector sizes. table 1 summarizes the different memory and inter- rupt vector sizes for the three devices. atmega88 and atmega168 support a real read-while-write self-programming mech- anism. there is a separate boot loader section, and the spm instruction can only execute from there. in ATMEGA48, there is no read-while-write support and no sepa- rate boot loader section. the spm instruction can execute from the entire flash. table 1. memory size summary device flash eeprom ram interrupt vector size ATMEGA48 4k bytes 256 bytes 512 bytes 1 instruction word/vector atmega88 8k bytes 512 bytes 1k bytes 1 instruction word/vector atmega168 16k bytes 512 bytes 1k bytes 2 instruction words/vector
5 ATMEGA48/88/168 2545bs?avr?01/04 pin descriptions vcc digital supply voltage. gnd ground. port b (pb7..0) xtal1/ xtal2/tosc1/tosc2 port b is an 8-bit bi-directional i/o port with internal pull-up resistors (selected for each bit). the port b output buffers have symmetrical drive characteristics with both high sink and source capability. as inputs, port b pins that are externally pulled low will source current if the pull-up resistors are activated. the port b pins are tri-stated when a reset condition becomes active, even if the clock is not running. depending on the clock selection fuse settings, pb6 can be used as input to the invert- ing oscillator amplifier and input to the internal clock operating circuit. depending on the clock selection fuse settings, pb7 can be used as output from the inverting oscillator amplifier. if the internal calibrated rc oscillator is used as chip clock source, pb7..6 is used as tosc2..1 input for the asynchronous timer/counter2 if the as2 bit in assr is set. the various special features of port b are elaborated in ?alternate functions of port b? on page 69 and ?system clock and clock options? on page 24. port c (pc5..0) port c is a 7-bit bi-directional i/o port with internal pull-up resistors (selected for each bit). the pc5..0 output buffers have symmetrical drive characteristics with both high sink and source capability. as inputs, port c pins that are externally pulled low will source current if the pull-up resistors are activated. the port c pins are tri-stated when a reset condition becomes active, even if the clock is not running. pc6/reset if the rstdisbl fuse is programmed, pc6 is used as an i/o pin. note that the electri- cal characteristics of pc6 differ from those of the other pins of port c. if the rstdisbl fuse is unprogrammed, pc6 is used as a reset input. a low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running. the minimum pulse length is given in table 20 on page 41. shorter pulses are not guaranteed to generate a reset. the various special features of port c are elaborated in ?alternate functions of port c? on page 73. port d (pd7..0) port d is an 8-bit bi-directional i/o port with internal pull-up resistors (selected for each bit). the port d output buffers have symmetrical drive characteristics with both high sink and source capability. as inputs, port d pins that are externally pulled low will source current if the pull-up resistors are activated. the port d pins are tri-stated when a reset condition becomes active, even if the clock is not running. the various special features of port d are elaborated in ?alternate functions of port d? on page 75. avc c avcc is the supply voltage pin for the a/d converter, pc3..0, and adc7..6. it should be externally connected to v cc , even if the adc is not used. if the adc is used, it should be connected to v cc through a low-pass filter. note that pc6..4 use digital supply voltage, v cc . aref aref is the analog reference pin for the a/d converter.
6 ATMEGA48/88/168 2545bs?avr?01/04 adc7..6 (tqfp and mlf package only) in the tqfp and mlf package, adc7..6 serve as analog inputs to the a/d converter. these pins are powered from the analog supply and serve as 10-bit adc channels.
7 ATMEGA48/88/168 2545bs?avr?01/04 register summary address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 page (0xff) reserved ? ? ? ? ? ? ? ? (0xfe) reserved ? ? ? ? ? ? ? ? (0xfd) reserved ? ? ? ? ? ? ? ? (0xfc) reserved ? ? ? ? ? ? ? ? (0xfb) reserved ? ? ? ? ? ? ? ? (0xfa) reserved ? ? ? ? ? ? ? ? (0xf9) reserved ? ? ? ? ? ? ? ? (0xf8) reserved ? ? ? ? ? ? ? ? (0xf7) reserved ? ? ? ? ? ? ? ? (0xf6) reserved ? ? ? ? ? ? ? ? (0xf5) reserved ? ? ? ? ? ? ? ? (0xf4) reserved ? ? ? ? ? ? ? ? (0xf3) reserved ? ? ? ? ? ? ? ? (0xf2) reserved ? ? ? ? ? ? ? ? (0xf1) reserved ? ? ? ? ? ? ? ? (0xf0) reserved ? ? ? ? ? ? ? ? (0xef) reserved ? ? ? ? ? ? ? ? (0xee) reserved ? ? ? ? ? ? ? ? (0xed) reserved ? ? ? ? ? ? ? ? (0xec) reserved ? ? ? ? ? ? ? ? (0xeb) reserved ? ? ? ? ? ? ? ? (0xea) reserved ? ? ? ? ? ? ? ? (0xe9) reserved ? ? ? ? ? ? ? ? (0xe8) reserved ? ? ? ? ? ? ? ? (0xe7) reserved ? ? ? ? ? ? ? ? (0xe6) reserved ? ? ? ? ? ? ? ? (0xe5) reserved ? ? ? ? ? ? ? ? (0xe4) reserved ? ? ? ? ? ? ? ? (0xe3) reserved ? ? ? ? ? ? ? ? (0xe2) reserved ? ? ? ? ? ? ? ? (0xe1) reserved ? ? ? ? ? ? ? ? (0xe0) reserved ? ? ? ? ? ? ? ? (0xdf) reserved ? ? ? ? ? ? ? ? (0xde) reserved ? ? ? ? ? ? ? ? (0xdd) reserved ? ? ? ? ? ? ? ? (0xdc) reserved ? ? ? ? ? ? ? ? (0xdb) reserved ? ? ? ? ? ? ? ? (0xda) reserved ? ? ? ? ? ? ? ? (0xd9) reserved ? ? ? ? ? ? ? ? (0xd8) reserved ? ? ? ? ? ? ? ? (0xd7) reserved ? ? ? ? ? ? ? ? (0xd6) reserved ? ? ? ? ? ? ? ? (0xd5) reserved ? ? ? ? ? ? ? ? (0xd4) reserved ? ? ? ? ? ? ? ? (0xd3) reserved ? ? ? ? ? ? ? ? (0xd2) reserved ? ? ? ? ? ? ? ? (0xd1) reserved ? ? ? ? ? ? ? ? (0xd0) reserved ? ? ? ? ? ? ? ? (0xcf) reserved ? ? ? ? ? ? ? ? (0xce) reserved ? ? ? ? ? ? ? ? (0xcd) reserved ? ? ? ? ? ? ? ? (0xcc) reserved ? ? ? ? ? ? ? ? (0xcb) reserved ? ? ? ? ? ? ? ? (0xca) reserved ? ? ? ? ? ? ? ? (0xc9) reserved ? ? ? ? ? ? ? ? (0xc8) reserved ? ? ? ? ? ? ? ? (0xc7) reserved ? ? ? ? ? ? ? ? (0xc6) udr0 usart i/o data register 180 (0xc5) ubrr0h usart baud rate register high 184 (0xc4) ubrr0l usart baud rate register low 184 (0xc3) reserved ? ? ? ? ? ? ? ? (0xc2) ucsr0c umsel01 umsel00 upm01 upm00 usbs0 ucsz01 /udord0 ucsz00 / ucpha0 ucpol0 183/196 (0xc1) ucsr0b rxcie0 txcie0 udrie0 rxen0 txen0 ucsz02 rxb80 txb80 182 (0xc0) ucsr0a rxc0 txc0 udre0 fe0 dor0 upe0 u2x0 mpcm0 180
8 ATMEGA48/88/168 2545bs?avr?01/04 (0xbf) reserved ? ? ? ? ? ? ? ? (0xbe) reserved ? ? ? ? ? ? ? ? (0xbd) twamr twam6 twam5 twam4 twam3 twam2 twam1 twam0 ?209 (0xbc) twcr twint twea twsta twsto twwc twen ?twie 206 (0xbb) twdr 2-wire serial interface data register 208 (0xba) twar twa6 twa5 twa4 twa3 twa2 twa1 twa0 twgce 208 (0xb9) twsr tws7 tws6 tws5 tws4 tws3 ? twps1 twps0 207 (0xb8) twbr 2-wire serial interface bit rate register 206 (0xb7) reserved ? ? ? ? ? ? ? (0xb6) assr ? exclk as2 tcn2ub ocr2aub ocr2bub tcr2aub tcr2bub 148 (0xb5) reserved ? ? ? ? ? ? ? ? (0xb4) ocr2b timer/counter2 output compare register b 147 (0xb3) ocr2a timer/counter2 output compare register a 147 (0xb2) tcnt2 timer/counter2 (8-bit) 147 (0xb1) tccr2b foc2a foc2b ? ? wgm22 cs22 cs21 cs20 146 (0xb0) tccr2a com2a1 com2a0 com2b1 com2b0 ? ?wgm21wgm20 143 (0xaf) reserved ? ? ? ? ? ? ? ? (0xae) reserved ? ? ? ? ? ? ? ? (0xad) reserved ? ? ? ? ? ? ? ? (0xac) reserved ? ? ? ? ? ? ? ? (0xab) reserved ? ? ? ? ? ? ? ? (0xaa) reserved ? ? ? ? ? ? ? ? (0xa9) reserved ? ? ? ? ? ? ? ? (0xa8) reserved ? ? ? ? ? ? ? ? (0xa7) reserved ? ? ? ? ? ? ? ? (0xa6) reserved ? ? ? ? ? ? ? ? (0xa5) reserved ? ? ? ? ? ? ? ? (0xa4) reserved ? ? ? ? ? ? ? ? (0xa3) reserved ? ? ? ? ? ? ? ? (0xa2) reserved ? ? ? ? ? ? ? ? (0xa1) reserved ? ? ? ? ? ? ? ? (0xa0) reserved ? ? ? ? ? ? ? ? (0x9f) reserved ? ? ? ? ? ? ? ? (0x9e) reserved ? ? ? ? ? ? ? ? (0x9d) reserved ? ? ? ? ? ? ? ? (0x9c) reserved ? ? ? ? ? ? ? ? (0x9b) reserved ? ? ? ? ? ? ? ? (0x9a) reserved ? ? ? ? ? ? ? ? (0x99) reserved ? ? ? ? ? ? ? ? (0x98) reserved ? ? ? ? ? ? ? ? (0x97) reserved ? ? ? ? ? ? ? ? (0x96) reserved ? ? ? ? ? ? ? ? (0x95) reserved ? ? ? ? ? ? ? ? (0x94) reserved ? ? ? ? ? ? ? ? (0x93) reserved ? ? ? ? ? ? ? ? (0x92) reserved ? ? ? ? ? ? ? ? (0x91) reserved ? ? ? ? ? ? ? ? (0x90) reserved ? ? ? ? ? ? ? ? (0x8f) reserved ? ? ? ? ? ? ? ? (0x8e) reserved ? ? ? ? ? ? ? ? (0x8d) reserved ? ? ? ? ? ? ? ? (0x8c) reserved ? ? ? ? ? ? ? ? (0x8b) ocr1bh timer/counter1 - output compare register b high byte 129 (0x8a) ocr1bl timer/counter1 - output compare register b low byte 129 (0x89) ocr1ah timer/counter1 - output compare register a high byte 129 (0x88) ocr1al timer/counter1 - output compare register a low byte 129 (0x87) icr1h timer/counter1 - input capture register high byte 129 (0x86) icr1l timer/counter1 - input capture register low byte 129 (0x85) tcnt1h timer/counter1 - counter register high byte 129 (0x84) tcnt1l timer/counter1 - counter register low byte 129 (0x83) reserved ? ? ? ? ? ? ? ? (0x82) tccr1c foc1a foc1b ? ? ? ? ? ?128 (0x81) tccr1b icnc1 ices1 ? wgm13 wgm12 cs12 cs11 cs10 127 (0x80) tccr1a com1a1 com1a0 com1b1 com1b0 ? ?wgm11wgm10 125 (0x7f) didr1 ? ? ? ? ? ? ain1d ain0d 230 (0x7e) didr0 ? ? adc5d adc4d adc3d adc2d adc1d adc0d 245 address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 page
9 ATMEGA48/88/168 2545bs?avr?01/04 (0x7d) reserved ? ? ? ? ? ? ? ? (0x7c) admux refs1 refs0 adlar ? mux3 mux2 mux1 mux0 241 (0x7b) adcsrb ?acme ? ? ? adts2 adts1 adts0 244 (0x7a) adcsra aden adsc adate adif adie adps2 adps1 adps0 242 (0x79) adch adc data register high byte 244 (0x78) adcl adc data register low byte 244 (0x77) reserved ? ? ? ? ? ? ? ? (0x76) reserved ? ? ? ? ? ? ? ? (0x75) reserved ? ? ? ? ? ? ? ? (0x74) reserved ? ? ? ? ? ? ? ? (0x73) reserved ? ? ? ? ? ? ? ? (0x72) reserved ? ? ? ? ? ? ? ? (0x71) reserved ? ? ? ? ? ? ? ? (0x70) timsk2 ? ? ? ? ? ocie2b ocie2a toie2 150 (0x6f) timsk1 ? ?icie1 ? ? ocie1b ocie1a toie1 130 (0x6e) timsk0 ? ? ? ? ? ocie0b ocie0a toie0 100 (0x6d) pcmsk2 pcint23 pcint22 pcint21 pcint20 pcint19 pcint18 pcint17 pcint16 83 (0x6c) pcmsk1 ? pcint14 pcint13 pcint12 pcint11 pcint10 pcint9 pcint8 83 (0x6b) pcmsk0 pcint7 pcint6 pcint5 pcint4 pcint3 pcint2 pcint1 pcint0 84 (0x6a) reserved ? ? ? ? ? ? ? ? (0x69) eicra ? ? ? ? isc11 isc10 isc01 isc00 80 (0x68) pcicr ? ? ? ? ? pcie2 pcie1 pcie0 (0x67) reserved ? ? ? ? ? ? ? ? (0x66) osccal oscillator calibration register 30 (0x65) reserved ? ? ? ? ? ? ? ? (0x64) prr prtwi prtim2 prtim0 ? prtim1 prspi prusart0 pradc 37 (0x63) reserved ? ? ? ? ? ? ? ? (0x62) reserved ? ? ? ? ? ? ? ? (0x61) clkpr clkpce ? ? ? clkps3 clkps2 clkps1 clkps0 33 (0x60) wdtcsr wdif wdie wdp3 wdce wde wdp2 wdp1 wdp0 49 0x3f (0x5f) sreg i t h s v n z c 9 0x3e (0x5e) sph ? ? ? ? ? (sp10) 5. sp9 sp8 11 0x3d (0x5d) spl sp7 sp6 sp5 sp4 sp3 sp2 sp1 sp0 11 0x3c (0x5c) reserved ? ? ? ? ? ? ? ? 0x3b (0x5b) reserved ? ? ? ? ? ? ? ? 0x3a (0x5a) reserved ? ? ? ? ? ? ? ? 0x39 (0x59) reserved ? ? ? ? ? ? ? ? 0x38 (0x58) reserved ? ? ? ? ? ? ? ? 0x37 (0x57) spmcsr spmie (rwwsb) 5. ? (rwwsre) 5. blbset pgwrt pgers selfprgen 260 0x36 (0x56) reserved ? ? ? ? ? ? ? ? 0x35 (0x55) mcucr ? ? ?pud ? ? ivsel ivce 0x34 (0x54) mcusr ? ? ? ? wdrf borf extrf porf 0x33 (0x53) smcr ? ? ? ? sm2 sm1 sm0 se 35 0x32 (0x52) reserved ? ? ? ? ? ? ? ? 0x31 (0x51) mondr monitor data register 0x30 (0x50) acsr acd acbg aco aci acie acic acis1 acis0 228 0x2f (0x4f) reserved ? ? ? ? ? ? ? ? 0x2e (0x4e) spdr spi data register 160 0x2d (0x4d) spsr spif wcol ? ? ? ? ? spi2x 160 0x2c (0x4c) spcr spie spe dord mstr cpol cpha spr1 spr0 158 0x2b (0x4b) gpior2 general purpose i/o register 2 23 0x2a (0x4a) gpior1 general purpose i/o register 1 23 0x29 (0x49) reserved ? ? ? ? ? ? ? ? 0x28 (0x48) ocr0b timer/counter0 output compare register b 0x27 (0x47) ocr0a timer/counter0 output compare register a 0x26 (0x46) tcnt0 timer/counter0 (8-bit) 0x25 (0x45) tccr0b foc0a foc0b ? ? wgm02 cs02 cs01 cs00 0x24 (0x44) tccr0a com0a1 com0a0 com0b1 com0b0 ? ?wgm01wgm00 0x23 (0x43) gtccr tsm ? ? ? ? ? psrasy psrsync 103/152 0x22 (0x42) eearh (eeprom address register high byte) 5. 18 0x21 (0x41) eearl eeprom address register low byte 18 0x20 (0x40) eedr eeprom data register 18 0x1f (0x3f) eecr ? ? eepm1 eepm0 eerie eempe eepe eere 18 0x1e (0x3e) gpior0 general purpose i/o register 0 23 0x1d (0x3d) eimsk ? ? ? ? ? ? int1 int0 81 0x1c (0x3c) eifr ? ? ? ? ? ? intf1 intf0 82 address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 page
10 ATMEGA48/88/168 2545bs?avr?01/04 note: 1. for compatibility with future devices, reserved bits should be written to zero if accessed. reserved i/o memory addresse s should never be written. 2. i/o registers within the address range 0x00 - 0x1f are directly bit-accessible using the sbi and cbi instructions. in these registers, the value of single bits can be checked by using the sbis and sbic instructions. 3. some of the status flags are cleared by writing a logical one to them. note that, unlike most other avrs, the cbi and sbi instructions will only operate on the specified bit, and can therefore be used on registers containing such status flags. the cbi and sbi instructions work with registers 0x00 to 0x1f only. 4. when using the i/o specific commands in and out, the i/o addresses 0x00 - 0x3f must be used. when addressing i/o registers as data space using ld and st instructions, 0x20 must be added to these addresses. the ATMEGA48/88/168 is a complex microcontroller with more peripheral units than can be supported within the 64 location reserved in opcode for the in and out instructions. for the extended i/o space from 0x60 - 0xff in sram, only the st/sts/std and ld/lds/ldd instructions can be used. 5. only valid for atmega88/168 0x1b (0x3b) pcifr ? ? ? ? ? pcif2 pcif1 pcif0 0x1a (0x3a) reserved ? ? ? ? ? ? ? ? 0x19 (0x39) reserved ? ? ? ? ? ? ? ? 0x18 (0x38) reserved ? ? ? ? ? ? ? ? 0x17 (0x37) tifr2 ? ? ? ? ? ocf2b ocf2a tov2 151 0x16 (0x36) tifr1 ? ?icf1 ? ? ocf1b ocf1a tov1 130 0x15 (0x35) tifr0 ? ? ? ? ? ocf0b ocf0a tov0 0x14 (0x34) reserved ? ? ? ? ? ? ? ? 0x13 (0x33) reserved ? ? ? ? ? ? ? ? 0x12 (0x32) reserved ? ? ? ? ? ? ? ? 0x11 (0x31) reserved ? ? ? ? ? ? ? ? 0x10 (0x30) reserved ? ? ? ? ? ? ? ? 0x0f (0x2f) reserved ? ? ? ? ? ? ? ? 0x0e (0x2e) reserved ? ? ? ? ? ? ? ? 0x0d (0x2d) reserved ? ? ? ? ? ? ? ? 0x0c (0x2c) reserved ? ? ? ? ? ? ? ? 0x0b (0x2b) portd portd7 portd6 portd5 portd4 portd3 portd2 portd1 portd0 79 0x0a (0x2a) ddrd ddd7 ddd6 ddd5 ddd4 ddd3 ddd2 ddd1 ddd0 79 0x09 (0x29) pind pind7 pind6 pind5 pind4 pind3 pind2 pind1 pind0 79 0x08 (0x28) portc ? portc6 portc5 portc4 portc3 portc2 portc1 portc0 79 0x07 (0x27) ddrc ? ddc6 ddc5 ddc4 ddc3 ddc2 ddc1 ddc0 79 0x06 (0x26) pinc ? pinc6 pinc5 pinc4 pinc3 pinc2 pinc1 pinc0 79 0x05 (0x25) portb portb7 portb6 portb5 portb4 portb3 portb2 portb1 portb0 79 0x04 (0x24) ddrb ddb7 ddb6 ddb5 ddb4 ddb3 ddb2 ddb1 ddb0 79 0x03 (0x23) pinb pinb7 pinb6 pinb5 pinb4 pinb3 pinb2 pinb1 pinb0 79 0x02 (0x22) reserved ? ? ? ? ? ? ? ? 0x01 (0x21) reserved ? ? ? ? ? ? ? ? 0x0 (0x20) reserved ? ? ? ? ? ? ? ? address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 page
11 ATMEGA48/88/168 2545bs?avr?01/04 instruction set summary mnemonics operands description operation flags #clocks arithmetic and logic instructions add rd, rr add two registers rd rd + rr z,c,n,v,h 1 adc rd, rr add with carry two registers rd rd + rr + c z,c,n,v,h 1 adiw rdl,k add immediate to word rdh:rdl rdh:rdl + k z,c,n,v,s 2 sub rd, rr subtract two registers rd rd - rr z,c,n,v,h 1 subi rd, k subtract constant from register rd rd - k z,c,n,v,h 1 sbc rd, rr subtract with carry two registers rd rd - rr - c z,c,n,v,h 1 sbci rd, k subtract with carry constant from reg. rd rd - k - c z,c,n,v,h 1 sbiw rdl,k subtract immediate from word rdh:rdl rdh:rdl - k z,c,n,v,s 2 and rd, rr logical and registers rd rd ? rr z,n,v 1 andi rd, k logical and register and constant rd rd ? kz,n,v1 or rd, rr logical or registers rd rd v rr z,n,v 1 ori rd, k logical or register and constant rd rd v k z,n,v 1 eor rd, rr exclusive or registers rd rd rr z,n,v 1 com rd one?s complement rd 0xff ? rd z,c,n,v 1 neg rd two?s complement rd 0x00 ? rd z,c,n,v,h 1 sbr rd,k set bit(s) in register rd rd v k z,n,v 1 cbr rd,k clear bit(s) in register rd rd ? (0xff - k) z,n,v 1 inc rd increment rd rd + 1 z,n,v 1 dec rd decrement rd rd ? 1 z,n,v 1 tst rd test for zero or minus rd rd ? rd z,n,v 1 clr rd clear register rd rd rd z,n,v 1 ser rd set register rd 0xff none 1 mul rd, rr multiply unsigned r1:r0 rd x rr z,c 2 muls rd, rr multiply signed r1:r0 rd x rr z,c 2 mulsu rd, rr multiply signed with unsigned r1:r0 rd x rr z,c 2 fmul rd, rr fractional multiply unsigned r1:r0 (rd x rr) << 1 z,c 2 fmuls rd, rr fractional multiply signed r1:r0 (rd x rr) << 1 z,c 2 fmulsu rd, rr fractional multiply signed with unsigned r1:r0 (rd x rr) << 1 z,c 2 branch instructions rjmp k relative jump pc pc + k + 1 none 2 ijmp indirect jump to (z) pc z none 2 jmp (1) kdirect jump pc knone3 rcall k relative subroutine call pc pc + k + 1 none 3 icall indirect call to (z) pc znone3 call (1) k direct subroutine call pc knone4 ret subroutine return pc stack none 4 reti interrupt return pc stack i 4 cpse rd,rr compare, skip if equal if (rd = rr) pc pc + 2 or 3 none 1/2/3 cp rd,rr compare rd ? rr z, n,v,c,h 1 cpc rd,rr compare with carry rd ? rr ? c z, n,v,c,h 1 cpi rd,k compare register with immediate rd ? k z, n,v,c,h 1 sbrc rr, b skip if bit in register cleared if (rr(b)=0) pc pc + 2 or 3 none 1/2/3 sbrs rr, b skip if bit in register is set if (rr(b)=1) pc pc + 2 or 3 none 1/2/3 sbic p, b skip if bit in i/o register cleared if (p(b)=0) pc pc + 2 or 3 none 1/2/3 sbis p, b skip if bit in i/o register is set if (p(b)=1) pc pc + 2 or 3 none 1/2/3 brbs s, k branch if status flag set if (sreg(s) = 1) then pc pc+k + 1 none 1/2 brbc s, k branch if status flag cleared if (sreg(s) = 0) then pc pc+k + 1 none 1/2 breq k branch if equal if (z = 1) then pc pc + k + 1 none 1/2 brne k branch if not equal if (z = 0) then pc pc + k + 1 none 1/2 brcs k branch if carry set if (c = 1) then pc pc + k + 1 none 1/2 brcc k branch if carry cleared if (c = 0) then pc pc + k + 1 none 1/2 brsh k branch if same or higher if (c = 0) then pc pc + k + 1 none 1/2 brlo k branch if lower if (c = 1) then pc pc + k + 1 none 1/2 brmi k branch if minus if (n = 1) then pc pc + k + 1 none 1/2 brpl k branch if plus if (n = 0) then pc pc + k + 1 none 1/2 brge k branch if greater or equal, signed if (n v= 0) then pc pc + k + 1 none 1/2 brlt k branch if less than zero, signed if (n v= 1) then pc pc + k + 1 none 1/2 brhs k branch if half carry flag set if (h = 1) then pc pc + k + 1 none 1/2 brhc k branch if half carry flag cleared if (h = 0) then pc pc + k + 1 none 1/2 brts k branch if t flag set if (t = 1) then pc pc + k + 1 none 1/2 brtc k branch if t flag cleared if (t = 0) then pc pc + k + 1 none 1/2 brvs k branch if overflow flag is set if (v = 1) then pc pc + k + 1 none 1/2 brvc k branch if overflow flag is cleared if (v = 0) then pc pc + k + 1 none 1/2
12 ATMEGA48/88/168 2545bs?avr?01/04 brie k branch if interrupt enabled if ( i = 1) then pc pc + k + 1 none 1/2 brid k branch if interrupt disabled if ( i = 0) then pc pc + k + 1 none 1/2 bit and bit-test instructions sbi p,b set bit in i/o register i/o(p,b) 1none2 cbi p,b clear bit in i/o register i/o(p,b) 0none2 lsl rd logical shift left rd(n+1) rd(n), rd(0) 0 z,c,n,v 1 lsr rd logical shift right rd(n) rd(n+1), rd(7) 0 z,c,n,v 1 rol rd rotate left through carry rd(0) c,rd(n+1) rd(n),c rd(7) z,c,n,v 1 ror rd rotate right through carry rd(7) c,rd(n) rd(n+1),c rd(0) z,c,n,v 1 asr rd arithmetic shift right rd(n) rd(n+1), n=0..6 z,c,n,v 1 swap rd swap nibbles rd(3..0) rd(7..4),rd(7..4) rd(3..0) none 1 bset s flag set sreg(s) 1sreg(s)1 bclr s flag clear sreg(s) 0 sreg(s) 1 bst rr, b bit store from register to t t rr(b) t 1 bld rd, b bit load from t to register rd(b) tnone1 sec set carry c 1c1 clc clear carry c 0 c 1 sen set negative flag n 1n1 cln clear negative flag n 0 n 1 sez set zero flag z 1z1 clz clear zero flag z 0 z 1 sei global interrupt enable i 1i1 cli global interrupt disable i 0 i 1 ses set signed test flag s 1s1 cls clear signed test flag s 0 s 1 sev set twos complement overflow. v 1v1 clv clear twos complement overflow v 0 v 1 set set t in sreg t 1t1 clt clear t in sreg t 0 t 1 seh set half carry flag in sreg h 1h1 clh clear half carry flag in sreg h 0 h 1 data transfer instructions mov rd, rr move between registers rd rr none 1 movw rd, rr copy register word rd+1:rd rr+1:rr none 1 ldi rd, k load immediate rd knone1 ld rd, x load indirect rd (x) none 2 ld rd, x+ load indirect and post-inc. rd (x), x x + 1 none 2 ld rd, - x load indirect and pre-dec. x x - 1, rd (x) none 2 ld rd, y load indirect rd (y) none 2 ld rd, y+ load indirect and post-inc. rd (y), y y + 1 none 2 ld rd, - y load indirect and pre-dec. y y - 1, rd (y) none 2 ldd rd,y+q load indirect with displacement rd (y + q) none 2 ld rd, z load indirect rd (z) none 2 ld rd, z+ load indirect and post-inc. rd (z), z z+1 none 2 ld rd, -z load indirect and pre-dec. z z - 1, rd (z) none 2 ldd rd, z+q load indirect with displacement rd (z + q) none 2 lds rd, k load direct from sram rd (k) none 2 st x, rr store indirect (x) rr none 2 st x+, rr store indirect and post-inc. (x) rr, x x + 1 none 2 st - x, rr store indirect and pre-dec. x x - 1, (x) rr none 2 st y, rr store indirect (y) rr none 2 st y+, rr store indirect and post-inc. (y) rr, y y + 1 none 2 st - y, rr store indirect and pre-dec. y y - 1, (y) rr none 2 std y+q,rr store indirect with displacement (y + q) rr none 2 st z, rr store indirect (z) rr none 2 st z+, rr store indirect and post-inc. (z) rr, z z + 1 none 2 st -z, rr store indirect and pre-dec. z z - 1, (z) rr none 2 std z+q,rr store indirect with displacement (z + q) rr none 2 sts k, rr store direct to sram (k) rr none 2 lpm load program memory r0 (z) none 3 lpm rd, z load program memory rd (z) none 3 lpm rd, z+ load program memory and post-inc rd (z), z z+1 none 3 spm store program memory (z) r1:r0 none - in rd, p in port rd pnone1 out p, rr out port p rr none 1 push rr push register on stack stack rr none 2 mnemonics operands description operation flags #clocks
13 ATMEGA48/88/168 2545bs?avr?01/04 note: 1. these instructions are only available in atmega168. pop rd pop register from stack rd stack none 2 mcu control instructions nop no operation none 1 sleep sleep (see specific descr. for sleep function) none 1 wdr watchdog reset (see specific descr. for wdr/timer) none 1 break break for on-chip debug only none n/a mnemonics operands description operation flags #clocks
14 ATMEGA48/88/168 2545bs?avr?01/04 ordering information ATMEGA48 note: 1. this device can also be supplied in wafer form. please contact your local atmel sales office for detailed ordering infor mation and minimum quantities. 2. pb-free packaging alternative 3. see figure 131 on page 293 and figure 132 on page 293. speed (mhz) power supply ordering code package operation range 12 (3) 1.8 - 5.5 ATMEGA48v-12ai ATMEGA48v-12pi ATMEGA48v-12mi ATMEGA48v-12aj (2) ATMEGA48v-12pj (2) ATMEGA48v-12mj (2) 32a 28p3 32m1-a 32a 28p3 32m1-a industrial (-40 c to 85 c) 24 (3) 2.7 - 5.5 ATMEGA48-24ai ATMEGA48-24pi ATMEGA48-24mi ATMEGA48-24aj (2) ATMEGA48-24pj (2) ATMEGA48-24mj (2) 32a 28p3 32m1-a 32a 28p3 32m1-a industrial (-40 c to 85 c) package type 32a 32-lead, thin (1.0 mm) plastic quad flat package (tqfp) 28p3 28-lead, 0.300? wide, plastic dual inline package (pdip) 32m1-a 32-pad, 5 x 5 x 1.0 body, lead pitch 0.50 mm micro lead frame package (mlf)
15 ATMEGA48/88/168 2545bs?avr?01/04 atmega88 note: 1. this device can also be supplied in wafer form. please contact your local atmel sales office for detailed ordering infor mation and minimum quantities. 2. pb-free packaging alternative 3. see figure 131 on page 293 and figure 132 on page 293. speed (mhz) power supply ordering code package operation range 12 (3) 1.8 - 5.5 atmega88v-12ai atmega88v-12pi atmega88v-12mi atmega88v-12aj (2) atmega88v-12pj (2) atmega88v-12mj (2) 32a 28p3 32m1-a 32a 28p3 32m1-a industrial (-40 c to 85 c) 24 (3) 2.7 - 5.5 atmega88-24ai atmega88-24pi atmega88-24mi atmega88-24aj (2) atmega88-24pj (2) atmega88-24mj (2) 32a 28p3 32m1-a 32a 28p3 32m1-a industrial (-40 c to 85 c) package type 32a 32-lead, thin (1.0 mm) plastic quad flat package (tqfp) 28p3 28-lead, 0.300? wide, plastic dual inline package (pdip) 32m1-a 32-pad, 5 x 5 x 1.0 body, lead pitch 0.50 mm micro lead frame package (mlf)
16 ATMEGA48/88/168 2545bs?avr?01/04 atmega168 note: 1. this device can also be supplied in wafer form. please contact your local atmel sales office for detailed ordering infor mation and minimum quantities. 2. pb-free packaging alternative 3. see figure 131 on page 293 and figure 132 on page 293. speed (mhz) power supply ordering code package operation range 12 (3) 1.8 - 5.5 atmega168v-12ai atmega168v-12pi atmega168v-12mi atmega168v-12aj (2) atmega168v-12pj (2) atmega168v-12mj (2) 32a 28p3 32m1-a 32a 28p3 32m1-a industrial (-40 c to 85 c) 24 (3) 2.7 - 5.5 atmega168-24ai atmega168-24pi atmega168-24mi atmega168-24aj (2) atmega168-24pj (2) atmega168-24mj (2) 32a 28p3 32m1-a 32a 28p3 32m1-a industrial (-40 c to 85 c) package type 32a 32-lead, thin (1.0 mm) plastic quad flat package (tqfp) 28p3 28-lead, 0.300? wide, plastic dual inline package (pdip) 32m1-a 32-pad, 5 x 5 x 1.0 body, lead pitch 0.50 mm micro lead frame package (mlf)
17 ATMEGA48/88/168 2545bs?avr?01/04 packaging information 32a 2325 orchard parkway san jose, ca 95131 title drawing no. r rev. 32a, 32-lead, 7 x 7 mm body size, 1.0 mm body thickness, 0.8 mm lead pitch, thin profile plastic quad flat package (tqfp) b 32a 10/5/2001 pin 1 identifier 0?~7? pin 1 l c a1 a2 a d1 d e e1 e b notes: 1. this package conforms to jedec reference ms-026, variation aba. 2. dimensions d1 and e1 do not include mold protrusion. allowable protrusion is 0.25 mm per side. dimensions d1 and e1 are maximum plastic body size dimensions including mold mismatch. 3. lead coplanarity is 0.10 mm maximum. a 1.20 a1 0.05 0.15 a2 0.95 1.00 1.05 d 8.75 9.00 9.25 d1 6.90 7.00 7.10 note 2 e 8.75 9.00 9.25 e1 6.90 7.00 7.10 note 2 b 0.30 0.45 c 0.09 0.20 l 0.45 0.75 e 0.80 typ common dimensions (unit of measure = mm) symbol min nom max note
18 ATMEGA48/88/168 2545bs?avr?01/04 28p3 2325 orchard parkway san jose, ca 95131 title drawing no. r rev. 28p3 , 28-lead (0.300"/7.62 mm wide) plastic dual inline package (pdip) b 28p3 09/28/01 pin 1 e1 a1 b ref e b1 c l seating plane a 0?~ 15? d e eb b2 (4 places) common dimensions (unit of measure = mm) symbol min nom max note a 4.5724 a1 0.508 d 34.544 ? 34.798 note 1 e 7.620 8.255 e1 7.112 7.493 note 1 b 0.381 0.533 b1 1.143 1.397 b2 0.762 1.143 l 3.175 3.429 c 0.203 0.356 eb 10.160 e 2.540 typ note: 1. dimensions d and e1 do not include mold flash or protrusion. mold flash or protrusion shall not exceed 0.25 mm (0.010").
19 ATMEGA48/88/168 2545bs?avr?01/04 32m1-a 2325 orchard parkway san jose, ca 95131 title drawing no. r rev. 32m1-a , 32-pad, 5 x 5 x 1.0 mm body, lead pitch 0.50 mm micro lead frame package (mlf) c 32m1-a 01/15/03 common dimensions (unit of measure = mm) symbol min nom max note pin 1 id d1 d e1 e e b a3 a2 a1 a d2 e2 0.08 c l 1 2 3 p p 0 1 2 3 a 0.80 0.90 1.00 a1 ? 0.02 0.05 a2 ? 0.65 1.00 a3 0.20 ref b 0.18 0.23 0.30 d 5.00 bsc d1 4.75 bsc d2 2.95 3.10 3.25 e 5.00 bsc e1 4.75bsc e2 2.95 3.10 3.25 e 0.50 bsc l 0.30 0.40 0.50 p ? ? 0.60 ? ? 12 o notes: 1. jedec standard mo-220, fig. 2 (anvil singulation), vhhd-2. top view side view bottom view 0 pin 1 id
20 ATMEGA48/88/168 2545bs?avr?01/04 errata ATMEGA48 the revision letter in this section refers to the revision of the ATMEGA48 device. rev a  wrong values read after erase only operation  watchdog timer interrupt disabled  start-up time with crystal oscillator is higher than expected  high power consumption in power-down with external clock  asynchronous oscillator does not stop in power-down 1. wrong values read after erase only operation at supply voltages below 2.7 v, an eeprom location that is erased by the erase only operation may read as programmed (0x00). problem fix/workaround if it is necessary to read an eeprom location after erase only, use an atomic write operation with 0xff as data in order to erase a location. in any case, the write only operation can be used as intended. thus no special considerations are needed as long as the erased location is not read before it is programmed. 2. watchdog timer interrupt disabled if the watchdog timer interrupt flag is not cleared before a new timeout occurs, the watchdog will be disabled, and the interrupt flag will automatically be cleared. this is only applicable in interrupt only mode. if the watchdog is configured to reset the device in the watchdog time-out following an interrupt, the device works correctly. problem fix / workaround make sure there is enough time to always service the first timeout event before a new watchdog timeout occurs. this is done by selecting a long enough time-out period. 3. start-up time with crystal oscillator is higher than expected the clock counting part of the start-up time is about 2 times higher than expected for all start-up periods when running on an external crystal. this applies only when waking up by reset. wake-up from power down is not affected. for most settings, the clock counting parts is a small fraction of the overall start-up time, and thus, the problem can be ignored. the exception is when using a very low frequency crystal like for instance a 32 khz clock crystal. problem fix / workaround no known workaround. 4. high power consumption in power-down with external clock the power consumption in power down with an active external clock is about 10 times higher than when using internal rc or external oscillators. problem fix / workaround stop the external clock when the device is in power down. 5. asynchronous oscillator does not stop in power-down the asynchronous oscillator does not stop when entering power down mode. this leads to higher power consumption than expected. problem fix / workaround manually disable the asynchronous timer before entering power down.
21 ATMEGA48/88/168 2545bs?avr?01/04 errata atmega88 the revision letter in this section refers to the revision of the atmega88 device. rev a  wrong values read after erase only operation 1. wrong values read after erase only operation at supply voltages below 2.7 v, an eeprom location that is erased by the erase only operation may read as programmed (0x00). problem fix/workaround if it is necessary to read an eeprom location after erase only, use an atomic write operation with 0xff as data in order to erase a location. in any case, the write only operation can be used as intended. thus no special considerations are needed as long as the erased location is not read before it is programmed.
22 ATMEGA48/88/168 2545bs?avr?01/04 errata atmega168 the revision letter in this section refers to the revision of the atmega168 device. rev a  wrong values read after erase only operation 1. wrong values read after erase only operation at supply voltages below 2.7 v, an eeprom location that is erased by the erase only operation may read as programmed (0x00). problem fix/workaround if it is necessary to read an eeprom location after erase only, use an atomic write operation with 0xff as data in order to erase a location. in any case, the write only operation can be used as intended. thus no special considerations are needed as long as the erased location is not read before it is programmed.
23 ATMEGA48/88/168 2545bs?avr?01/04 datasheet change log please note that the referring page numbers in this section are referred to this docu- ment. the referring revision in this section are referring to the document revision. changes from rev. 2545a-09/03 to rev. 2545b-01/04 1. added pdip to ?i/o and packages?, updated ?speed grade? and power con- sumption estimates in ?features? on page 1. 2. updated ?stack pointer? on page 11 with ramend as recommended stack pointer value. 3. added section ?power reduction register? on page 37 and a note regarding the use of the prr bits to 2-wire, timer/counters, usart, analog comparator and adc sections. 4. updated ?watchdog timer? on page 46. 5. updated figure 55 on page 125 and table 56 on page 126. 6. extra compare match interrupt ocf2b added to features in section ?8-bit timer/counter2 with pwm and asynchronous operation? on page 132 7. updated table 19 on page 37, table 102 on page 245, table 118 to table 121 on page 272 to 273 and table 98 on page 236. added note 2 to table 115 on page 270. fixed typo in table 42 on page 81. 8. updated whole ?ATMEGA48/88/168 typical characteristics ? preliminary data? on page 298. 9. added item 2 to 5 in ?errata ATMEGA48? on page 20. 10. renamed the following bits: - spmen to selfprgen, - psr2 to psrasy - psr10 to psrsync - watchdog reset to watchdog system reset. 11. updated c code examples containing old iar syntax. 12. updated blbset description in ?store program memory control and status register ? spmcsr? on page 260.
printed on recycled paper. disclaimer: atmel corporation makes no warranty for the use of its products , other than those expressly contained in the company?s standar d warranty which is detailed in atmel?s terms and conditions located on the company?s web site. the company assumes no responsibi lity for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time wi thout notice, and does not make any commitment to update the information contained herein. no licenses to patents or other intellectual property of atmel are granted by the company in connection with the sale of atmel produc ts, expressly or by implication. atmel?s products are not aut horized for use as critical components in life support devices or systems. atmel corporation atmel operations 2325 orchard parkway san jose, ca 95131, usa tel: 1(408) 441-0311 fax: 1(408) 487-2600 regional headquarters europe atmel sarl route des arsenaux 41 case postale 80 ch-1705 fribourg switzerland tel: (41) 26-426-5555 fax: (41) 26-426-5500 asia room 1219 chinachem golden plaza 77 mody road tsimshatsui east kowloon hong kong tel: (852) 2721-9778 fax: (852) 2722-1369 japan 9f, tonetsu shinkawa bldg. 1-24-8 shinkawa chuo-ku, tokyo 104-0033 japan tel: (81) 3-3523-3551 fax: (81) 3-3523-7581 memory 2325 orchard parkway san jose, ca 95131, usa tel: 1(408) 441-0311 fax: 1(408) 436-4314 microcontrollers 2325 orchard parkway san jose, ca 95131, usa tel: 1(408) 441-0311 fax: 1(408) 436-4314 la chantrerie bp 70602 44306 nantes cedex 3, france tel: (33) 2-40-18-18-18 fax: (33) 2-40-18-19-60 asic/assp/smart cards zone industrielle 13106 rousset cedex, france tel: (33) 4-42-53-60-00 fax: (33) 4-42-53-60-01 1150 east cheyenne mtn. blvd. colorado springs, co 80906, usa tel: 1(719) 576-3300 fax: 1(719) 540-1759 scottish enterprise technology park maxwell building east kilbride g75 0qr, scotland tel: (44) 1355-803-000 fax: (44) 1355-242-743 rf/automotive theresienstrasse 2 postfach 3535 74025 heilbronn, germany tel: (49) 71-31-67-0 fax: (49) 71-31-67-2340 1150 east cheyenne mtn. blvd. colorado springs, co 80906, usa tel: 1(719) 576-3300 fax: 1(719) 540-1759 biometrics/imaging/hi-rel mpu/ high speed converters/rf datacom avenue de rochepleine bp 123 38521 saint-egreve cedex, france tel: (33) 4-76-58-30-00 fax: (33) 4-76-58-34-80 literature requests www.atmel.com/literature 2545bs?avr?01/04 ? atmel corporation 2004 . all rights reserved. atmel ? and combinations thereof, avr ? , and avr studio ? are the registered trademarks of atmel corporation or its subsidiaries. microsoft ? , windows ? , windows nt ? , and windows xp ? are the registered trademarks of microsoft corpo- ration. other terms and product names may be the trademarks of others


▲Up To Search▲   

 
Price & Availability of ATMEGA48

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X